﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ChuyenDongVatLy
{
    
    public class Camera
    {
        public Camera() { xcamera = 0; ycamera = 0; }
        public float xcamera; 
        public float ycamera;
        public void UpdateCamera(float xObject,float yObject)
        {           
            if (xcamera<=xObject-400)
            {
                xcamera=xObject- 400;
            }
            else if (xObject <= xcamera + 200)
            {
                xcamera = xObject - 200;                  
               
            }
            if (yObject<ycamera+200)
            {
                ycamera = yObject - 200;
            }          

        }
    }
}
